﻿using AtentoFramework2008.Infrastructure.Entity;
using NHibernate.Criterion;
using NStore.Domain;

namespace NStore.Infrastructure.Repositories
{
    public class UserRepository : Repository<User>
    {
        public virtual User GetByUserName(string userName)
        {
            if (userName == null) return null;
            return session.CreateCriteria<User>().Add(Restrictions.Eq("UserName", userName)).UniqueResult<User>();
        }
    }
}
